<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>最美乡村</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/wx/css/country.css" />
</head>
<body>
<div class="country">
    <div id="header">
        <div class="logo"></div>
        <div class="search">
            <form action="__MODULE__/Village/country_ls/" method="get" enctype="multipart/form-data">
                <input name="keyword" type="text" placeholder="搜索乡村" value="{$keyword}"/>
            </form>
            <i></i></div>
    </div>
    <div class="swipePanel">
        <div class="swipe">
            <ul id="slider">
                <li><a href="http://news.xiangtws.com/index.php/Wx/Village/info/id/19/"><img src="__PUBLIC__/wx/images/banner2.jpg" alt='' /></a></li>
                <li><a href="http://news.xiangtws.com/index.php/Wx/Village/info/id/20/"><img src="__PUBLIC__/wx/images/banner3.jpg" alt='' /></a></li>
                <li><a href="http://news.xiangtws.com/index.php/Wx/Village/info/id/21/"><img src="__PUBLIC__/wx/images/banner4.jpg" alt='' /></a></li>
            </ul>
            <div id="pagenavi">
                <a href="javascript:void(0);" class="active">1</a>
                <a href="javascript:void(0);">2</a>
                <a href="javascript:void(0);">3</a>
            </div>
        </div>
    </div>
    <!--<div class="icon">
        <a href="__MODULE__/Vadmin/vadmin_ls/" class="on">
        	<div class="pic"><img src="__PUBLIC__/wx/img/icon01.png"/></div>
            <div class="topic">乡土卫士</div>
        </a>
        <a href="__MODULE__/Article/celebrity_ls/">
        	<div class="pic"><img src="__PUBLIC__/wx/img/icon02.png"/></div>
            <div class="topic">地方贤达</div>
        </a>
        <a href="__MODULE__/Article/stories_ls/">
        	<div class="pic"><img src="__PUBLIC__/wx/img/icon03.png"/></div>
            <div class="topic">乡村夜话</div>
        </a>
        <a href="__MODULE__/Article/farming_ls/">
        	<div class="pic"><img src="__PUBLIC__/wx/img/icon04.png"/></div>
            <div class="topic">特色产品</div>
        </a>
        <div class="clear"></div>
    </div>-->
    <div class="countrylist">
        <div class="tit"><span>最美乡村</span><i><img src="__PUBLIC__/wx/img/address.png"/><b>武汉</b></i></div>
        <div class="list">
            <ul id="list" style="overflow:hidden;">
                <volist name="all" id="vo">
                    <li>
                        <a href="__MODULE__/Village/info/id/{$vo.id}/">
                            <div class="pic">
                                <eq name="vo.f_img" value="">
                                    <img src="__PUBLIC__/wx/images/pic01.jpg"/>
                                    <else/>
                                    <img src="{$vo.f_img}"/>
                                </eq>
                            </div>
                            <div class="intro">
                                <h2>{$vo.title}</h2>
                                <!--<div class="review"><span class="star"></span><span class="star"></span><span class="star"></span><span class="star"></span><span></span><b>距我：<c id="long_{$vo.id}">3.1km</c></b></div>-->
                                <div class="paragraph"><p>{$vo.content|preg_replace='/<[^>]*>/','',###|mb_substr=0,90,'utf-8'}</p></div>
                                <div class="people"><span>乡土卫士</span><div class="right"><b>
                                    <eq name="vo.va_img" value="">
                                        <img src="__PUBLIC__/wx/images/pic18.jpg"/>
                                        <else/>
                                        <img src="__PUBLIC__/Uploads/{$vo.va_img}"/>
                                    </eq>

                                </b><em>{$vo.name}</em><i>{$vo.supports}</i></div></div>
                            </div>
                        </a>
                    </li>
                </volist>
            </ul>
            <div class="loadMore" style="height:60px; line-height:60px; text-align:center; font-size:14px; color:#333;">加载中...</div>
        </div>
    </div>
    <!--<div style="display: none">-->
        <!--<a style="width: 100px;height: 50px;" href="http://zixun.xiangtws.com/jljljlj">周罗宁</a>-->
    <!--</div>-->
    <!--<div id="footer">-->
        <!--<a href="http://www.xiangtws.com/index.php/Wx/Index/index.html">-->
            <!--<div class="pic"><img src="__PUBLIC__/wx/img/icon-index.png"/></div>-->
            <!--<div class="topic">我的社区</div>-->
        <!--</a>-->
        <!--<a href="__MODULE__/Village/country/" class="on">-->
            <!--<div class="pic"><img src="__PUBLIC__/wx/img/icon-village02.png"/></div>-->
            <!--<div class="topic">最美乡村</div>-->
        <!--</a>-->
        <!--<a href="__MODULE__/Article/stories_ls/">-->
            <!--<div class="pic"><img src="__PUBLIC__/wx/img/icon-article.png"/></div>-->
            <!--<div class="topic">乡村夜话</div>-->
        <!--</a>-->
        <!--<a href="http://www.xiangtws.com/index.php/Wx/Product/index.html">-->
            <!--<div class="pic"><img src="__PUBLIC__/wx/img/icon-landmark.png"/></div>-->
            <!--<div class="topic">地标产品</div>-->
        <!--</a>-->
        <!--<a href="http://www.xiangtws.com/Wx/User/user/">-->
            <!--<div class="pic"><img src="__PUBLIC__/wx/img/icon-my.png"/></div>-->
            <!--<div class="topic">会员中心</div>-->
        <!--</a>-->
    <!--</div>-->
    <!--footer-->
    <include file="Public:footer" />
    <!--footer end-->
</div>
<script type="text/javascript" src="__PUBLIC__/wx/js/touchScroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/wx/js/touchslider.js"></script>
<script type="text/javascript">
    var active = 0, as = document.getElementById('pagenavi').getElementsByTagName('a');
    for ( var i = 0; i < as.length; i++) {
        (function() {
            var j = i;
            as[i].onclick = function() {
                t.slide(j);
                return false;
            };
        })();
    }
    var t = new TouchSlider({
        id : 'slider',
        speed : 600,
        timeout : 2000,
        before : function(index) {
            as[active].className = '';
            active = index;
            as[active].className = 'active';
        }
    });
</script>
<script src="__PUBLIC__/wx/js/jquery-1.9.1.js"></script>
<script type="text/javascript">
    //瀑布流
    var page=1;
    $(function () {
        $(window).scroll(function () {
            if (($(document).height() - $(this).scrollTop() - $(this).height())<1){
                setTimeout(function(){
                    //alert("getMore");
                    page++;
                    getMore();
                },1000);
            }
        });
    })
    function getMore(){
        $.ajax({
            type : "GET",
            dataType : "json",
            url: "__MODULE__/Village/country/page/"+page+"/keyword/{$keyword}/",
            async:false,
            success: function(data){
                var html='';
                if(data.length>0){
                    for(var i=0;i<data.length;i++){
                        html=html+"<li><a href='__MODULE__/Village/info/id/"+data[i].id+"/'><div class='pic'>";
                        if(data[i].f_img==''){
                            html=html+"<img src='__PUBLIC__/wx/images/pic01.jpg'/>";
                        }else{
                            html=html+"<img src='"+data[i].f_img+"'/>";
                        }
                        html=html+"</div><div class='intro'><h2>"+data[i].title+"</h2><div class='paragraph'><p>"+data[i].content+"</p></div><div class='people'><span>乡土卫士</span><div class='right'><b>";
                        if(data[i].va_img==''){
                            html=html+"<img src='__PUBLIC__/wx/images/pic18.jpg'/>";
                        }else{
                            html=html+"<img src='__PUBLIC__/Uploads/"+data[i].va_img+"'/>";
                        }
                        html=html+"</b><em>"+data[i].name+"</em><i>"+data[i].supports+"</i></div></div></div></a></li>";
                    }//end for
                    $("#list").append(html);//添加新的
                }else{
                    $(".loadMore").text("没有了！");
                }
            }
        });//end ajax
    }//end fun
</script>
</body>
</html>